<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/view/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="${contextPath}/css/user.css"
	type="text/css" media="all" />
<title>在线考试系统</title>

</head>
<body>
	<%@include file="/view/top.jsp"%>
	<form:form name="examSearchForm" method="post"
		action="${contextPath}/examSearch.action"
		commandName="ExamSearchCommand">
		<div>
			<table width="100%" border="0" align="center" cellpadding="0"
				cellspacing="0">
				<tr>
					<td height="30">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="15" height="30"><img src="images/tab_03.gif"
									width="15" height="30" /></td>
								<td background="images/tab_05.gif" height="70"><img
									src="images/311.gif" width="16" height="16" /><span
									class="STYLE4"><spring:message
											code="ui.examsearch.title" /></span></td>
								<td width="14"><img src="images/tab_07.gif" width="14"
									height="30" /></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="9" background="images/tab_12.gif">&nbsp;</td>
								<td>
									<table width="100%" border="0" cellpadding="4" cellspacing="1"
										bgcolor="#E1E1E1">
										<tr bgcolor="#ffffff">
											<td width="42%" align="right" class="STYLE1"><spring:message
													code="ui.examsearch.label.idCardNo" /></td>
											<td align="left" width="57%" class="STYLE1"><form:input
													path="idCardNo" id="idCardNo" size="32" maxlength="32" /></td>
										</tr>
										<tr bgcolor="#ffffff">
											<td width="42%" align="right" class="STYLE1"><spring:message
													code="ui.examsearch.label.uname" /></td>
											<td align="left" width="57%" class="STYLE1"><form:input
													path="uname" id="uname" size="32" maxlength="32" /></td>
										</tr>
										<tr bgcolor="#ffffff">
											<td align="center" colspan="2"
												style="font-size: 15px; color: #CC3300"><input
												type="submit"
												value="<spring:message code="ui.common.button.search" />"
												name="search" style="width: 50px;" />&nbsp;&nbsp;<input
												type="submit"
												value="<spring:message code="ui.common.button.export" />"
												name="excelExport" style="width: 50px;" /></td>
										</tr>
									</table>
								</td>
								<td width="9" background="images/tab_16.gif">&nbsp;</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td height="29">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="15" height="29"><img src="images/tab_20.gif"
									width="15" height="29" /></td>
								<td background="images/tab_21.gif">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="40%">&nbsp;</td>
										</tr>
									</table>
								</td>
								<td width="14"><img src="images/tab_22.gif" width="14"
									height="29" /></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</div>

		<div>
			<table width="100%" border="0" align="center" cellpadding="0"
				cellspacing="0">
				<tr>
					<td height="30">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="15" height="30"><img src="images/tab_03.gif"
									width="15" height="30" /></td>
								<td background="images/tab_05.gif"><span class="STYLE4"></span></td>
								<td width="14"><img src="images/tab_07.gif" width="14"
									height="30" /></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="9" background="images/tab_12.gif">&nbsp;</td>
								<td align="center">
									<table width="100%" border="0" cellpadding="4" cellspacing="1"
										bgcolor="#E1E1E1">
										<tr bgcolor="#f7f7f7">
											<th style="width: 10%;" nowrap="nowrap">序号</th>
											<th style="width: 15%;" nowrap="nowrap">姓名</th>
											<th style="width: 15%;" nowrap="nowrap">编号</th>
											<th style="width: 15%;" nowrap="nowrap">考试时间</th>
											<th style="width: 15%;" nowrap="nowrap">总分</th>
										</tr>
										<c:set var="bg" value="#f7f7f7" />
										<c:forEach items="${exams}" var="exam" varStatus="status">
											<c:choose>
												<c:when test="${bg == '#ffffff' }">
													<c:set var="bg" value="#f7f7f7" />
												</c:when>
												<c:otherwise>
													<c:set var="bg" value="#ffffff" />
												</c:otherwise>
											</c:choose>
											<tr bgcolor="${bg }">
												<td nowrap="nowrap">${status.index + 1}</td>
												<td nowrap="nowrap">${exam.userInfo.name}</td>
												<td nowrap="nowrap">${exam.userInfo.idCardNo}</td>
												<td nowrap="nowrap"><b>${exam.duration}<spring:message
															code="ui.common.duration.unit" /></b></td>
												<td nowrap="nowrap"><b>${exam.score}<spring:message
															code="ui.common.scores.unit" /></b></td>
											</tr>
										</c:forEach>
									</table>
								</td>
								<td width="9" background="images/tab_16.gif">&nbsp;</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td height="29">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="15" height="29"><img src="images/tab_20.gif"
									width="15" height="29" /></td>
								<td background="images/tab_21.gif">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="40%">&nbsp;</td>
										</tr>
									</table>
								</td>
								<td width="14"><img src="images/tab_22.gif" width="14"
									height="29" /></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</div>
	</form:form>

	<c:if test="${downloadFile != null && downloadFile != '' }">
		<iframe id="downloadForm" name="downloadForm" style="display: none"
			src="${contextPath}/excelExport?id=${downloadFile}"></iframe>
	</c:if>
</body>
</html>